package com.wanmait.schedule.service.impl;

import com.wanmait.schedule.entity.TeacherRole;
import com.wanmait.schedule.mapper.TeacherRoleMapper;
import com.wanmait.schedule.service.TeacherRoleService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 教师角色对应关系表 服务实现类
 * </p>
 *
 * @author wanmait
 * @since 2022-12-05
 */
@Service
public class TeacherRoleServiceImpl extends ServiceImpl<TeacherRoleMapper, TeacherRole> implements TeacherRoleService  {

    @Resource
    private TeacherRoleMapper teacherRoleMapper;

    @Override
    public void insertBatch(Integer id, Integer[] roleIds) {
        teacherRoleMapper.insertBatch(id,roleIds);
    }

    @Override
    public List<TeacherRole> findRoleById(Integer id) {
        return teacherRoleMapper.findRoleById(id);
    }

    @Override
    public void deleteById(Integer id) {
        teacherRoleMapper.deleteById(id);
    }
}